package com.cskaoyan.user.email;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @Author Chen
 * @Date 2022-09-20  22-48-59
 * @param
 * @return {@link null }
 * @description  异步发送邮件
 */
@Data
@Service
public class SendEmailThread implements Runnable {

    @Autowired
    MailServiceImpl mailService;


    String receiver;
    String subject;
    String content;

    @Override
    public void run() {

        //mailService.sendSimpleEmail(receiver,subject,content);
        mailService.sendHtmlEmail(receiver,subject,content);
    }
}
